				                   uccʹֲ

1. 
2. Linuxƽ̨װ
3. Windowsƽ̨װ
4. 󱨸
5. ʹucc


1. 

uccһйУȵԤCļԤ
ȻεñͻĿļĿļԼ
ļһյӦó

Ŀǰucc֧Intel X86ƽ̨ϵLinuxWindowsϵͳ

ѹصԴϵͳлһΪuccĿ¼Ŀ¼֯£

driver       ʵ
ucl          Cʵ
doc          ĵӢİ汾uccʹֲԼuccڲʵ
LICENSE	     ֤ļ
Makefile     Linuxƽ̨µMakefile
Makefile.win Windowsƽ̨µMakefile

ûر˵uccĿ¼С

2. Linuxƽ̨װ

Linux±УuccҪʹgccͷļԼһЩйߡ
ϵͳǷ/usr/bin/gcc/usr/bin/as

(1) uccȱʡᰲװ/usr/local/lib/uccĿ¼޸MakefileеUCCDIR
    ָĿ¼޸UCCDIR뽫driver/linux.cе
    UCCDIRĳֵͬ

(2) makedriveruclĿ¼make, uccucl

(3) make install, ½Ŀ¼$UCCDIRuccuclƵĿ¼

(4) make test, uccǷȷɹС²
        1) ʹuccucl, Ϊucl1
        2) uclΪucl.bak, ucl1Ϊucl
        3) ٴʹuccucl, Ϊucl2
	4) ָuclucl1
        5) cmp /b ucl1 ucl2Ƚucl1 ucl2ȽϽļһ

(5) make cleandriveruclĿ¼²ĿļӦó

(6) ûPATHĿ¼$UCCDIRuccῴuccİϢ

3. Windowsƽ̨װ

Windows±Уϵͳб谲װMicrosoft Visual Stduio 6߰汾 
uccҪʹVCͷļԼһЩйߡ

װVisual Studio 6%VCDIRVCİװĿ¼
(ȱʡΪC:\Program Files\Microsoft Visual Studio\VC98)

(1) %VCDIR\BinĿ¼Ƿml.exeһЩVC6 releaseûа
    ڣҪVC6İװϻȡ

(2) ȷPATH%VCDIR\Bin;%VCDIR\..\Common\MSDev98\Bin

(3) LIBINCLUDEڣֱ𴴽LIBINCLUDE

(4) ȷLIB%VCDIR\LibINCLUDE%VCDIR\Include

(5) ڿʼ˵жԻмcmd

װVisual Studio 2003(20052008)ڿʼ˵еĳһ
ΪMicrosoft Visual Studio 2003(20052008)ҵΪ
Visual Studio 2003(20052008)ʾĿݷʽ, ֱӵÿݷʽ

(1) uccȱʡᰲװC:\Program Files\uccĿ¼޸Makefile.winеUCCDIR
    ָĿ¼

(2) nmake -f Makefile.windriveruclĿ¼nmake, ucc.exeucl.exe

(3) nmake -f Makefile.win install, ½Ŀ¼$UCCDIR, ucc.exeucl.exeƵĿ¼

(4) nmake -f Makefile.win testɵĲLinuxƽ̨ƣȽϵĽ
    һͬòͬļʱ

(5) nmake -f Makefile.win cleandriveruclĿ¼²ĿļӦó

(6) ûPATHĿ¼$UCCDIRuccῴuccİϢ

ע⣺װVisual Studio 2003(20052008)Ժʹuccʱ
Visual Studio 2003(20052008)ʾС

4. 󱨸

ȷȫȡڱȷԣзִ뼰ʱͿϵ
ڱ֮ǰ:
(1) ȷuccԴ޸ɵ
(2) һСĳ󣬽Ԥĳļ͵wenjunw@yahoo.cn
Ἣİ߶λлл֧֡

5. ʹucc

ucc [options] (file | -xxx)...

ѡ

--dump-ast   ӡ﷨﷨ӡչΪ.astļ
--dump-IR    ӡм룬м뱻ӡչΪ.uilļ
-E           ֻԤ
-S           ֻԤͱɻ
-c           ֻԤͻĿ
-o file      ӦóΪ'file'
-Idir        dirӵļĿ¼
-Dname=def   Ԥ꣬Ϊ'name',ֵΪ'def'
-Uname       ȡ봦'name'Ķ
-h	     ӡϢ
-v           ʾõ
-Wa,options  ɶŷָѡ
-Wl,options  ɶŷָѡ

ucc-ͷѡ, ʣµʶΪļ

Ծhello,worldΪٶļΪhello.c
#include <stdio.h>

int main()
{
    printf("Hello, World\n");
    return 0;
}

ucc -o hello hello.c Ӧóhello

